﻿570. 至少有5名直接下属的经理
# Write your MySQL query statement below
select
E2.name as name
from
Employee as E1 right join Employee as E2 on E1.managerId = E2.id
group by
E2.id
having
count(*) >= 5

面试题 02.06.回文链表
/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode() : val(0), next(nullptr) {}
 *     ListNode(int x) : val(x), next(nullptr) {}
 *     ListNode(int x, ListNode *next) : val(x), next(next) {}
 * };
 */
    class Solution {
    public:
        ListNode* beginer;
        bool Check(ListNode* node)
        {
            if (node != nullptr)
            {
                if (!Check(node->next))
                {
                    return false;
                }

                if (beginer->val != node->val)
                {
                    return false;
                }

                beginer = beginer->next;
            }
            return true;
        }

        bool isPalindrome(ListNode* head)
        {
            beginer = head;
            return Check(head);
        }
};